function censore($str)
{
  if(!($fd = fopen("bad_words.txt", "r"))){
    return($str);
  }
  while (!feof ($fd)){
    $line = trim(fgets($fd));
    $str = str_replace($line, "[OCENZUROWANO]", $str);
  }
  return $str;
}
